Documentation > CMS Template API Library > Input > ShowCheckBox(String,String,String,String,String,String,Nullable[Boolean],String)

ShowCheckBox

Adds a checkbox control to the input screen.

public System.Void ShowCheckBox(String,String,String,String,String,String,Nullable[Boolean],String)

Parameters

NameDescriptionType
label The label of the field when displayed. System.String
fieldName The field name where the value will be stored. System.String
storedValue The value which gets stored when the checkbox is clicked. System.String
checkBoxLabel Describing the checkbox function. (will display right of checkbox) System.String
helpMessage Optional: help message System.String
unCheckedValue Optional: The value which gets stored when the checkbox is not clicked. System.String
defaultChecked Optional: The default state of the checkbox. True is checked, false is unchecked, null is not set (not applicable in Classic). Defaults to null. This may be false only if unCheckedValue is also specified. Nullable<Boolean>
popupMessage Optional: The popup help message. System.String

Code Example

C#

Sample:
<% Input.ShowCheckBox("Feature This?", "feature_this", "yes", "yes"); %>
            

Connect with Crownpeak